import request from '@/utils/request'

export function save(form) {
  return request({
    url: '/api/sys/dept/save',
    method: 'post',
    data: {
      dept_name: form.dept_name,
      dept_pcode: form.dept_pcode
    }
  })
}

export function tree() {
  return request({
    url: '/api/sys/dept/list',
    method: 'post',
    data: {}
  })
}

export function update(form) {
  return request({
    url: '/api/sys/dept/update',
    method: 'post',
    data: {
      dept_id: form.dept_id,
      dept_name: form.dept_name
    }
  })
}

